/**
 * 
 */
package ma.cdm.compteRenduVO;

import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.io.Serializable;

/**
 * @author cdm-u6688
 *
 */
public class AuthenticateVO implements Serializable, Externalizable {

	  private String userID;
	  private boolean isAuthenticated;
	  private String messageError;
	  private PersonneVO userDetails;
	  
	public String getUserID() {
		return userID;
	}

	public void setUserID(String userID) {
		this.userID = userID;
	}

	public boolean isAuthenticated() {
		return isAuthenticated;
	}

	public void setAuthenticated(boolean isAuthenticated) {
		this.isAuthenticated = isAuthenticated;
	}

	public String getMessageError() {
		return messageError;
	}

	public void setMessageError(String messageError) {
		this.messageError = messageError;
	}
	
	

	public PersonneVO getUserDetails() {
		return userDetails;
	}

	public void setUserDetails(PersonneVO userDetails) {
		this.userDetails = userDetails;
	}

	public void writeExternal(ObjectOutput output) throws IOException {
		 output.writeObject(isAuthenticated);
         output.writeObject(messageError);
         output.writeObject(userDetails);
         output.writeObject(userID);
	}

	public void readExternal(ObjectInput input) throws IOException,
			ClassNotFoundException {
		isAuthenticated =(Boolean) input.readObject();
        messageError =(String) input.readObject() ;
        userDetails=(PersonneVO) input.readObject() ;
        userID = (String)input.readObject() ;

	}

}
